<template>
	<view>
		<yHeader :current='0' :screenWidth="screenWidth" @Tabs="handleTabs"></yHeader>
		<view class="bg-grey pb-4 ">
			<backend :Index="num" v-if="screenWidth>480"></backend>
			<backendM v-else></backendM>
		</view>
		<yFooter Show :screenWidth="screenWidth"></yFooter>
	</view>
</template>

<script>
	import yHeader from '@/components/yHeader.vue'
	import yFooter from '@/components/yFooter.vue'
	import backend from "./backend.vue";
	import backendM from "./backend-m.vue";
	export default {
		components: {
			yHeader,
			yFooter,
			backend,
			backendM,
		},
		data() {
			return {
				screenWidth: 0,
				num:0
			};
		},
		methods: {
			handleTabs(url){
				uni.navigateTo({
					url
				})
			},
		},
		onLoad(options) {
			if(options.id){
				this.num = parseInt(options.id)
			}
			this.screenWidth = uni.getSystemInfoSync().windowWidth;
			uni.onWindowResize((res) => {
				this.screenWidth = res.size.windowWidth;
			});
		},
	};
</script>
<style lang="scss" scoped>

</style>